
Ext.namespace('GBIF.GeoSpatial');

GBIF.GeoSpatial.Grid = function(config){
	 //var vecLayer = new OpenLayers.Layer.Vector("vector");

	var proxy=new Ext.data.HttpProxy({
		url:'../../resources/json/getfeatureinfo-proxy.json'
	});

	var reader=new Ext.data.JsonReader(
		{
		},[
			//{name: 'Fid', mapping: 'Fid'},
			{name: 'id', mapping: 'id'},            
			{name: 'occurrence_date' , mapping: 'occurrence_date'}, 
		]
	)
	var store=new Ext.data.JsonStore({
    		root: 'featureMemeber{african_mammals}'
		,  	proxy:proxy
		//,	fields:['african_mammals', {attributes:{}},'url', {name:'size', type: 'float'}, {name:'lastmod', type:'date'}]
		//,	fields: ['african_mammals',{name:'id'},{name:'occurrence_date'} ]
		,	fields: ['id','occurrence_date']
		//,	reader:reader
		,	autoLoad: true	
 	});

	Ext.apply(this,config,{
			title: "Grid"
        ,	region: "east"
        ,	store: store
        ,	width: 320
        ,	columns: [
			/*
{
	            	header: "Fid"
	            ,	width: 200
	            ,	dataIndex: "Fid"
        	} 
*/
			{
	            	header: "id"
	            ,	width: 200
	            ,	dataIndex: "id"
        	} 
			,{
	            	header: "occurrence_date"
	            ,	width: 100
	            ,	dataIndex: "occurrence_date"
        	}]
	});
	GBIF.GeoSpatial.Grid.superclass.constructor.call(this, config)
}
Ext.extend(GBIF.GeoSpatial.Grid, Ext.grid.GridPanel, {

});